#include "mainwindow.h"
#include<QHBoxLayout>
#include<QVBoxLayout>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    QWidget *cw=new QWidget();
    this->setCentralWidget(cw);

    QVBoxLayout *vb = new QVBoxLayout(cw);
    QHBoxLayout *h1 = new QHBoxLayout;
    QHBoxLayout *h2 = new QHBoxLayout;

    vb->addLayout(h1);
    vb->addLayout(h2);


    QPushButton * p1=new QPushButton("1");
    QPushButton * p2=new QPushButton("2");
    QPushButton * p3=new QPushButton("3");
    QPushButton * p4=new QPushButton("4");
    QPushButton * p5=new QPushButton("5");
    QPushButton * p6=new QPushButton("6");
    h1->addWidget(p1);
    h1->addWidget(p2);
    h1->addWidget(p3);
    h2->addWidget(p4);
    h2->addWidget(p5);
    h2->addWidget(p6);
}

MainWindow::~MainWindow()
{
}

